package com.sjyy.common.dict;

public enum TranStatusEnum {
	TRAN_STATUS_PAY("支付","01"),
	TRAN_STATUS_REVOKE("撤回", "02"),
	;

	private String name;
	private String key;

	private TranStatusEnum(String name, String key) {
		this.name = name;
		this.key = key;
	}

	public static String getNameByKey(String key) {
		for (TranStatusEnum a : TranStatusEnum.values()) {
			if (a.getKey().equals(key)) {
				return a.name;
			}
		}
		return "未知";
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

}
